import subprocess

"""
order = subprocess.Popen('dir', shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
suc_res = order.stdout.read().decode('gbk')
order2 = subprocess.Popen('dir11', shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
suc_err = order2.stderr.read().decode('gbk')
print(suc_res)
print('-----------------')
print(suc_err)
"""
# run底层就是封装的Popen(python3后面才封装的)
order = subprocess.run('dir', shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
res = order.stdout.decode('gbk')
print(res)
